Computer systems rely on video compression and decompression for video storage/playback and video teleconferencing applications. The objective typically is to reduce the number of transmitted or stored bits needed to represent the original signal while minimizing the loss in resolution when decompressed. By balancing these competing factors, video teleconferencing and other real-time video transfer, for example, can be accomplished within the bandwidth restrictions imposed by local area networks, wide area networks, internetworks, and circuit-switched telephone networks, such as integrated services data network (ISDN) lines or standard telephone lines (POTS).
In order to optimize the bit rate/resolution trade-off, many compression/decompression algorithms are computationally intensive, especially when considering their real-time operation. The three most common compression standards are: MPEG standard developed by the Moving Pictures Experts Group, JPEG standard developed by the Joint Pictures Experts Group, and the H.26x video teleconferencing standard. Each uses a variety of encoding techniques simultaneously on the frames of video data. Specifically, the MPEG and the H.26x standards implement a combination of spatial, temporal, and entropy encoding, while the JPEG standard uses only spatial and entropy encoding.
Generally, there have been three hardware approaches to handling the computational tasks required by video compression/decompression in the context of modern computer, and specifically personal computer/workstation, systems. For example, the central processing unit (CPU) of the computer can perform all of the operations necessary to execute the compression/decompression algorithms. In contrast, at the other end of the spectrum, dedicated compression/decompression hardware can be placed in the computer that is optimized for the task. Finally, a compression co-processor, typically located in a card in the computer system, can be installed, which shares the task of compression/decompression with the central processing unit. One example of hardware designed for the last approach is the DECchip 21230 designed by Digital Equipment Corporation.
There are technical and/or practical problems associated with each of the typical approaches. The CPU is generally not well optimized for handling pixel-granularity video data. Many times the data units are eight bits or less, whereas the CPU is generally designed for 32 or 64 bit wide data paths. Single instruction multiple data architectures (SIMD) are typically better adapted to handle these kinds of operations where a common series of operations are performed on many pixels of data. Dedicated compression hardware utilizes these SIMD architectures and consequently works well, but is typically too expensive for the consumer/small business environments. Many times the compression hardware alone will exceed the cost of the average desktop machine. Finally, the compression co-processor approach provides a better price/performance trade-off but is still an expensive hardware upgrade in an increasingly commoditized computer market.
A parallel trend in the computer industry is the combination of video capture and video control capabilities on a single card. As a result, these cards typically have a video output port to control the monitor and videb-inputs for receiving RGB, NTSC, and/or PAL encoded video signals.
The present invention is directed to a video compression system for a computer that distributes processing responsibility between the computer""s central processing unit and co-processing resources. In this way, it avoids the costs associated with dedicated compression hardware while still allowing compression/decompression to occur in, or near, real-time. It capitalizes, however, on the trend toward integrating video capture capabilities into the video controller cards, in the preferred embodiment. Specifically, the video card is modified to include a motion estimation unit, which generates motion information describing inter-frame changes in the video data. The card then uses this motion information to perform motion-compensated temporal filtering on the video data before it is passed to the CPU, which performs the inter-frame and/or intra-frame compression. In a preferred embodiment, the temporal filtering reuses the video controller""s data path and frame buffer, both of which are also used to perform frame processing for the video display.
In general, according to one aspect, the invention features a method for compressing video data. The method comprises passing frames of video data to a motion estimation unit of the preprocessing hardware. This unit generates motion information describing inter-frame changes in the video data. Next, motion-compensated temporal filtering is performed on the frames of video data using the motion information in a video frame processing unit of the preprocessing hardware. Finally, the temporally filtered video data is passed to the central processing unit, which performs inter-frame and/or intra-frame compression with reference to the motion information. In this way, motion-compensated temporal filtering is performed, thus removing the associated noise without adding to the CPU""s processing burden.
In specific embodiments, the preprocessing hardware is located on a video capture card of the computer that also functions as a video controller, reusing the video frame processing unit and frame buffer. Further, pixel decimation can be additionally utilized.
The motion-compensated temporal filtering preferably comprises averaging values of pixels in a current frame with matching pixel values of a previous frame. Matching pixels are located by reference to motion vectors developed during the motion estimation. Since the filtering is motion compensated, heavier filtering algorithms can be utilized without degrading images within the frames such as by the generation of ghost trails around moving images.
In general, according to another aspect, the invention also features a video preprocessing and compression system for a computer. The system comprises a motion estimation unit that generates motion information describing inter-frame changes in video data. A video frame processing unit performs motion-compensated temporal filtering on frames of the video data using the motion information. The processed data is then passed to the central processing unit, which performs inter-frame and/or intra-frame compression with reference to the motion information. As a result of this division of processing, resources on a video capture card may be utilized to reduce the CPU""s processing burden and video controller resources reused for compression.
The above and other features of the invention including various novel details of construction and combinations of parts, and other advantages, will now be more particularly described with reference to the accompanying drawings and pointed out in the claims. It will be understood that the particular method and device embodying the invention are shown by way of illustration and not as a limitation of the invention. The principles and features of this invention may be employed in various and numerous embodiments without departing from the scope of the invention.